private subroutine BasinRasterExport(pathout)
delineate and export basin mask
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
character(len=*),
|
intent(in) |
|
|
:: |
pathout |
|
Variables
Type |
Visibility | Attributes |
|
Name |
| Initial | |
type(grid_integer),
|
public |
|
:: |
basin |
|
|
|
character(len=300),
|
public |
|
:: |
fileName |
|
|
|
integer(kind=short),
|
public |
|
:: |
i |
|
|
|
real(kind=float),
|
public |
|
:: |
x |
|
|
|
real(kind=float),
|
public |
|
:: |
y |
|
|
|
Source Code
SUBROUTINE BasinRasterExport &
!
( pathout )
IMPLICIT NONE
!arguments with intent in:
CHARACTER (LEN = *), INTENT(IN) :: pathout
!local declarations
INTEGER (KIND = short) :: i
CHARACTER (LEN = 300) :: fileName
TYPE (grid_integer) :: basin
REAL (KIND = float) :: x, y
!-------------------------------end of declaration-----------------------------
!initialize a dummy raster
CALL NewGrid (basin,flowDirection)
DO i = 1, sites % countObs
!fileName = TRIM(pathout) // 'basin_mask_id_' // &
fileName = 'basin_mask_id_' // TRIM (sites % obs (i) % id) // '.asc'
x = sites % obs (i) % xyz % easting
y = sites % obs (i) % xyz % northing
CALL BasinDelineate (flowDirection,x,y, basin)
CALL ExportGrid (basin, fileName, ESRI_ASCII)
END DO
CALL GridDestroy (basin)
RETURN
END SUBROUTINE BasinRasterExport